/* Janus Chat - Version 1.0
 * Authors: Matthew Perry
 *          Michael Freid
 *          Marc Latou
 *          Richard Lee
 *
 * The Janus Chat Client is a highly secured
 * peer-to-peer chat client designed to facilitate
 * the transfer of sensitive data or as a communication
 * medium for the extra paranoid
 *
 * This file contains the header for the lookup dialog
 * This dialog pops up when the application is attempting
 * to lookup a hostname the user supplied it. It allows
 * the user to watch see the app doing something */

#ifndef LOOKUPDIALOG_H
#define LOOKUPDIALOG_H

#include <QDialog>
#include <QAbstractSocket>

namespace Ui {
    class LookupDialog;
}

class LookupDialog : public QDialog
{
    Q_OBJECT

    public:
        explicit LookupDialog(const QString& addr, QWidget *parent = 0);
        ~LookupDialog();

    private:
        Ui::LookupDialog *ui;

        QString myAddress;      /* Member variable of the address we are connecting to */

    public slots:
        void foundHost();       /* Activated by the socket's hostFound() signal */
        void connectionEstablished();   /* Activated by the socket's connected() signal */
        void errorOccured(QAbstractSocket::SocketError e);  /* Activated by the socket's error() signal */

    private slots:
        void on_buttonCancel_clicked(); /* Activated when cancel is clicked */

    signals:
        void cancelled();               /* Emitted when cancel is clicked */
};

#endif // LOOKUPDIALOG_H
